package own.stu.jobgib.playown.mysql.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import own.stu.jobgib.playown.mysql.model.Sequence;

public interface SequenceRepository extends JpaRepository<Sequence,Long> {
//    @Query("from User u where u.name=:name")
//    String getValue(@Param("name") String name);


//    @Query(value="SELECT a FROM Sequence a WHERE function('DISTANCE',?1,?2,a.LONGITUDE,a.LATITUDE)<=2")
    @Query(value="SELECT function('currval',?1)")
    String getValue(String keyword);
}